<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<fmt:setBundle basename="messages" />
<html:form action="/adjustValuesToVersionCurrencyUpdate" styleId="mainForm">
	<table width="<bean:write name="totalSize"/>" align="center" border="0">
		<tr>
			<td style="width: 100%" align="center">
				<table width="100%" align="center" border="0" cellspacing="1" bgcolor="#CCCCC0">
					<logic:iterate id="erates" name="VersionForm" property="exchangeRateGroups" indexId="int_i">
						<tr class="<%=((int_i.intValue()%2)==0?"columnadatoPar":"columnadatoNon")%>">
							<td width="147">								
								<table width="100%" align="center" border="0" cellspacing="0" bgcolor="#CCCCC0">
									<tr class="<%=((int_i.intValue()%2)==0?"columnadatoPar":"columnadatoNon")%>">
										<td rowspan="2" width="50%">
											<bean:write name="erates" property="currency" />
										</td>
										<td height="20">
											<bean:message key="label.version.adjustvalue.currency.amount"/>
										</td>
									</tr>
									<tr class="<%=((int_i.intValue()%2)==0?"columnadatoPar":"columnadatoNon")%>">
										<td height="20">
											<bean:message key="label.version.adjustvalue.currency.avgamount"/>
										</td>
									</tr>
								</table>
							</td>
							<c:forEach var="erate" items="${erates.exchangeRateVersionViews}" varStatus="loop">
								<td align="center">
									
									<input 
									size="10"
									value='<c:out value="${erate.amount}"/>'
									name='exchangeRateGroups[<c:out value="${int_i}"/>].exchangeRateVersionViews[<c:out value="${loop.index}"/>].amount'
									class="columnanumero"
									onfocus="this.select();" 
									onkeyup="extractNumber(this,4,false);"/>		
									<br/>
									<input 
									size="10"
									value='<c:out value="${erate.avgAmount}"/>'
									name='exchangeRateGroups[<c:out value="${int_i}"/>].exchangeRateVersionViews[<c:out value="${loop.index}"/>].avgAmount'
									class="columnanumero"
									onfocus="this.select();" 
									onkeyup="extractNumber(this,4,false);"/>
								</td>
							</c:forEach>
						</tr>
					</logic:iterate>
					<tr>
					<td align="left" colspan="<bean:write name="totalPeriods"/>" height="30" class="etiqueta_campo">				
						<html:submit styleClass="boton"><bean:message key="label.common.save"/></html:submit>
						<html:button property="cancel" onclick="location.href = 'showVersionDetail.do'" styleClass="boton"><bean:message key="label.common.cancel"/></html:button>
			</td>
		</tr>
				</table>
			</td>
		</tr>
	</table>					
</html:form>